<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>代理任务目标列表-任务目标添加</title>
<link href="/zhenze/Public/admin/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/zhenze/Public/admin/js/jquery.js"></script>
<script type="text/javascript" src="/zhenze/Public/My97DatePicker/WdatePicker.js"></script>

<link href="/zhenze/Public/validform/Validform.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/zhenze/Public/validform/Validform_v5.3.2.js"></script>
<script type="text/javascript" src="/zhenze/Public/validform/Validform_Datatype.js"></script>
</head>

<body>

	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a href="<?php echo U('index/welcome');?>">首页</a></li>
			<li><a href="<?php echo U('duty/index');?>">代理任务目标列表</a></li>
		</ul>
    </div>
    
    <div class="formbody">

		<form name="myform" id="myform" action="<?php echo U('duty/addduty');?>" method="post">
			<ul class="forminfo">
				<li><label>任务月份</label><input name="info[duty_time]" id="duty_time" class="scinput" type="text" onfocus="WdatePicker({dateFmt: 'yyyy-MM'})" maxlength="20" style="width: 170px;" readonly value="<?php echo ($duty_time); ?>" datatype="*" errormsg="任务月份不能为空！" /><i class="Validform_checktip"></i></li>	
			</ul>
		
			<table class="tablelist">
				<thead>
					<tr>
						<th>编号</th>
						<th>代理用户名</th>
						<th>任务数量</th>
						<th>任务金额</th>
					</tr>
				</thead>
				<tbody>
					<?php if(is_array($agentinfo)): $i = 0; $__LIST__ = $agentinfo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$admin): $mod = ($i % 2 );++$i;?><tr>
						<td><?php echo ($admin["admin_id"]); ?></td>
						<td><?php echo ($admin["username"]); ?></td>
						<td><input name="info[duty_num][<?php echo ($admin["admin_id"]); ?>]" id="duty_num" type="text" style="width: 170px;" class="dfinput" datatype="/^\d+(\.\d+)?$/" maxlength="10" errormsg="任务数量不能为空！" /><i class="Validform_checktip"></i></td>
						<td><input name="info[duty_money][<?php echo ($admin["admin_id"]); ?>]" id="duty_money" type="text" style="width: 170px;" class="dfinput" datatype="/^\d+(\.\d+)?$/" maxlength="10" errormsg="任务金额不能为空！" /><i class="Validform_checktip"></i></td>
					</tr><?php endforeach; endif; else: echo "" ;endif; ?>
				</tbody>
			</table>

			<ul class="forminfo" style="padding-top:10px;">
				<li><label>&nbsp;</label><input name="loginbtn" type="submit" class="btn" value="确认保存"/></li>
			</ul>
		</form>

    </div>
	<script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
	$(function(){
		$("#myform").Validform({
			//tiptype:2
			tiptype:function(msg,o,cssctl){
				var objtip=o.obj.siblings(".Validform_checktip");
				cssctl(objtip,o.type);
				objtip.text(msg);
			}
		});
	}); 
	</script>
</body>

</html>